<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ page import="javax.servlet.http.Cookie" %>
<%
String path = request.getContextPath();
Cookie[] cookies = request.getCookies();
String personuuid = "";
String personemail = "";
String personpass = "";
if(cookies!=null){
	for(int i=0;i<cookies.length;i++){
		if("sapfreepersonuuid".equals(cookies[i].getName())){
			personuuid = cookies[i].getValue();
		}
		if("sapfreeemail".equals(cookies[i].getName())){
			personemail = cookies[i].getValue();
		}
		if("sapfreepassword".equals(cookies[i].getName())){
			personpass = cookies[i].getValue();
		}
	}
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="login,regist first">
<meta http-equiv="description" content="This is login page">

<title>飞客网</title>
<link href="<%=path%>/include/styleBase/css/fontStyle.css" rel="stylesheet"></link>
<link href="<%=path%>/include/styleBase/css/formStyle.css" rel="stylesheet"></link>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />

<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE2 {
	font-size: 48px;
	font-weight: bold;
	color: #035fb2;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
.STYLE3 {
	font-size: 24px;
	font-weight: bold;
}
-->
</style>

</head>
<body onLoad="document.getElementById('loginemail').focus()">
<form name="frm" method="post" action="javascript:_login();">
<input type="hidden" name="md5password" value="<%=personpass%>">
<br><br><br><br>
<table border="0" cellspacing="20" cellpadding="0" bgcolor="#CCCCCC" width="1000" align="center">
	<tr>
	  <td height="200" bgcolor="#FFFFFF">
      <table border="0" cellpadding="0" cellspacing="0" height="300" width="100%">
      	
        	<tr>
            	<td width="41%" align="center">
		        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                	<tr>
                    	<td align="center">
		                <img src="<%=path%>/images/sapfree3.png" border="0" width="430" height="100"></td>
                  </tr>
             	</table>              </td>
              <td width="59%"><table border="0" cellpadding="0" cellspacing="0" width="99%" align="center">
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td width="157" height="30" align="right" class="blackNormal14">Email：</td>
                  <td width="212"><input type="text" class="textInput" style="width:200px" name="loginemail" id="loginemail" tabindex="1" value="<%=personemail%>"></td>
                  <td width="96" align="left" class="blackNormal14" style="position:relative"><input type="checkbox" name="rememberme" checked>
                    记住密码</td>
                  <td width="96" class="blackBold14">找回密码</td>
                </tr>
                <tr>
                  <td width="157" height="30" align="right" class="blackNormal14">密码：</td>
                  <td width="212"><input type="password" class="textInput" style="width:200px" name="loginpassword" id="loginpassword" tabindex="2" value="<%=personpass%>"></td>
                  <td align="left" width="96"><input type="submit" name="loginbutton" border="0" value=" 登 录 " tabindex="3"></td>
                  <td width="96"><a href="<%=path%>/regist" class="lightBlueBold12">注册</a></td>
                </tr>
              </table></td>
        </tr>
        </table>
      </td> 
	</tr>
   
</table>
<br><%=personuuid%>
<br>email:<%=personemail%>
<br>pass:<%=personpass%>
</form>
</body>

</html>

<script language="javascript">
function _regist(){
	frm.action="<%=request.getContextPath()%>/regist/registpersoninfo";
	frm.submit();
}
function _login(){
	frm.action="<%=request.getContextPath()%>/login";
	frm.submit();
}

if(document.getElementById("loginemail").value!="" && document.getElementById("loginpassword").vlaue!=""){
	_login();
}
</script>
